package com.daiji.feixiang.adapter;

import com.daiji.feixiang.bean.ToolBean;
import com.daiji.feixiang.holder.MyBaseViewHolder;
import com.daiji.feixiang.holder.ToolViewHolder;

import java.util.ArrayList;

public class ToolAdapter extends MyBaseAdapter<ToolBean> {
    public ToolAdapter(ArrayList data) {
        super(data);
    }

    @Override
    public void initView(ToolBean item, MyBaseViewHolder viewHolder) {
        ToolViewHolder vh = (ToolViewHolder) viewHolder;
        vh.iv_icon.setImageResource(item.icon);
        vh.tv_title.setText(item.title);
    }

    @Override
    public ToolViewHolder getHolder() {
        return new ToolViewHolder();
    }
}
